import h from '../src/copySnabbdom/h'
import patch from '../src/copySnabbdom/patch'

const try_one = h('selection', { key: 'one' }, [
    h('span', { key: 'Q' }, 'Q'),
    h('span', { key: 'C' }, 'C'),
    h('span', { key: 'A' }, 'A'),
    h('span', { key: 'F' }, 'F'),
])

const try_two = h('selection', { key: 'one' }, [
    h('span', { key: 'A' }, 'A1'),
    h('span', { key: 'B' }, 'B1'),
    h('span', { key: 'C' }, 'C1'),
])

const container = document.getElementById('container')
const btn = document.getElementById('btn')

patch(container, try_one)
//
btn.onclick = function () {
    patch(try_one, try_two)
}

